// ActionScript file
package com.app.commands{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.app.business.TugasAkhirDelegate;
	import com.app.control.GetDataTugasAkhirByIdEvent;
	import com.app.model.ModelLocator;
	import com.app.vo.TugasAkhirVO;
	
	import mx.rpc.IResponder;
	public class GetDataTugasAkhirByIdCommand implements ICommand,IResponder{
        private var model:ModelLocator=ModelLocator.getInstance();
        public function execute(event : CairngormEvent):void{
            model.mahasiswa.isPending=true;
            var delegate:TugasAkhirDelegate=new TugasAkhirDelegate(this);
            var getDataEvent:GetDataTugasAkhirByIdEvent=GetDataTugasAkhirByIdEvent(event);
            delegate.getDataTugasAkhirById(getDataEvent.taVo);
        }
        public function result(data:Object):void{
            model.tugas_akhir.isPending=false;
            model.tugas_akhir.tugasAkhirVO=TugasAkhirVO(data)
        }
        public function fault(info:Object):void{
            model.tugas_akhir.isPending=false;
        }
	}
}